package xyz.jangle.thread;

import java.util.concurrent.TimeUnit;

public class TaskStart implements Runnable {
	
	private boolean flag;
	
	public TaskStart() {
		super();
		this.flag = false;
	}

	public TaskStart(boolean flag) {
		super();
		this.flag = flag;
	}



	@Override
	public void run() {
		if(!flag)
		while(true) {
			System.out.println("start111");
			try {
				TimeUnit.SECONDS.sleep(1);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}

	}

}
